package usualclass;

public class Clone implements Cloneable {

    public static void main(String[] args) throws CloneNotSupportedException {
//        Clone c1 = new Clone();
//        Clone c2 = (Clone) c1.clone();
//        System.out.println(c1 == c2);
//        System.out.println(c1);
//        System.out.println(c2);
//        System.out.println(c2.getClass().getName());
        String s1 = new String("123123");
        String s2 = new String("123123");
        String s3 = "123123";
        String s4 = "123123";
        System.out.println(s1 == s2); //地址比较
        System.out.println(s1.equals(s2)); //内容比较
        System.out.println(s3 == s4); //地址比较
        System.out.println(s3.equals(s4)); //内容比较
    }
}
